{$CLEO}

0A95: enable_thread_saving



// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'CPATH'

FOR 0@ = 0 TO 9 STEP 1 //func 9 * 5  
    if 0@ == 1                                                                                                                                                                                                                                    
    then 0AF0: write_int 1@ to_ini_file "CLEO\COPS_HOOK.ini" section "City Cops" key "WEAPON_ID"                                                                                                                                                 
    END                                                                                                                                                                                                                                              
    if 0@ == 2                                                                                                                                                                                                                                    
    then 0AF0: write_int 1@ to_ini_file "CLEO\COPS_HOOK.ini" section "Bike Cops" key "WEAPON_ID"                                                                                                                                               
    END                                                                                                                                                                                                                                              
    if 0@ == 3                                                                                                                                                                                                                                    
    then 0AF0: write_int 1@ to_ini_file "CLEO\COPS_HOOK.ini" section "Fbi Agents" key "WEAPON_ID"                                                                                                                                                  
    END                                                                                                                                                                                                                                              
    if 0@ == 4                                                                                                                                                                                                                                    
    then 0AF0: write_int 1@ to_ini_file "CLEO\COPS_HOOK.ini" section "Army Soldiers" key "WEAPON_ID"                                                                                                                                                   
    END                                                                                                                                                                                                                                              
    if 0@ == 5                                                                                                                                                                                                                                    
    then 0AF0: write_int 1@ to_ini_file "CLEO\COPS_HOOK.ini" section "Swat" key "WEAPON_ID"                                                                                                                                                 
    END                                                                                                                                                                                                                                              
    2@ = 350 //START AT                                                                                                   
    005A: 2@ += 0@ //ADD 0@                                                                                               
    0AB3: 2@ > 1@ //SEND PARAM AS WEAPON ID TO EXTERNAL SCRIPT                                                            
END

FOR 0@ = 0 TO 9 STEP 1 //func 9 * 5  
    if 0@ == 1                                                                                                                                                                                                                                    
    then 0AF0: write_int 1@ to_ini_file "CLEO\COPS_HOOK.ini" section "City Cops" key "DRIVE_BY_STATE"                                                                                                                                                 
    END                                                                                                                                                                                                                                              
    if 0@ == 2                                                                                                                                                                                                                                    
    then 0AF0: write_int 1@ to_ini_file "CLEO\COPS_HOOK.ini" section "Bike Cops" key "DRIVE_BY_STATE"                                                                                                                                               
    END                                                                                                                                                                                                                                              
    if 0@ == 3                                                                                                                                                                                                                                    
    then 0AF0: write_int 1@ to_ini_file "CLEO\COPS_HOOK.ini" section "Fbi Agents" key "DRIVE_BY_STATE"                                                                                                                                                  
    END                                                                                                                                                                                                                                              
    if 0@ == 4                                                                                                                                                                                                                                    
    then 0AF0: write_int 1@ to_ini_file "CLEO\COPS_HOOK.ini" section "Army Soldiers" key "DRIVE_BY_STATE"                                                                                                                                                   
    END                                                                                                                                                                                                                                              
    if 0@ == 5                                                                                                                                                                                                                                    
    then 0AF0: write_int 1@ to_ini_file "CLEO\COPS_HOOK.ini" section "Swat" key "DRIVE_BY_STATE"                                                                                                                                                 
    END                                                                                                                                                                                                                                              
    2@ = 300 //START AT                                                                                                    
    005A: 2@ += 0@ //ADD 0@                                                                                                
    0AB3: 2@ > 1@ //SEND PARAM AS WEAPON ID from EXTERNAL SCRIPT                                                             
END

//noob help
//const
//    ITEM     = 0@
///    tm_adr  = 1@
//    bith     = 2@
////    cmodel  = 3@
//    to_x    = 7@
//    to_y    = 8@
//    to_z    = 9@
//    id      = 4@
//    bith_weapon = 10@
///end
//const
//  _vehicle = 13@
//  _vehicle_struct = 14@
//  _vehicle_handle = 15@
//  _get_veh_model = 16@
//  _vehicle_driver = 17@
//  _seat_id = 18@
//end



repeat
wait 0 
until if Player.Defined(0)

//func load all weapons
for 4@ = 321 to 372 step 1
    if and                                                  
       not 4@ == 327                                       
       not 4@ == 328                                       
       not 4@ == 329                                       
       not 4@ == 330                                       
       not 4@ == 340                                       
       not 4@ == 345                                       
       not 4@ == 354                                       
       not 4@ == 332                                       
    then                                                    
        Model.Load(4@)                                     
        038B: load_requested_models                         
    end                                                     
end

WHILE TRUE
    WAIT 0
    0ab1: @add_occupants 0
    FOR 0@ = 1 TO 5 STEP 1
        1@  = 350 //START AT
        005A: 1@  += 0@ //ADD 0@
        0AB4: 4@ < 1@  //GET 4@
        Actor.StorePos($PLAYER_ACTOR, 7@, 8@, 9@)                                                                                                                             
        if 0AE1: 2@ = random_actor_near_point 7@ 8@ 9@ in_radius 500.0 find_next 1 pass_deads 0 //IF and SET                                                                  
        jf continue                                                                                                                                                                  
        IF NOT 2@ == -1                                                                                                                                                   
        jf continue                                                                                                                                                          
        IF 056D:   actor 2@ defined                                                                                                                                   
        jf continue
        IF not actor.Dead(2@)                                                                                                                           
        jf continue
        0665: get_actor 2@ model_to 3@
        if and                                 
           not 4@ == 39                        
           not 4@ == 40                        
           not 4@ == 44                        
           not 4@ == 45                        
           not 4@ == 19                        
           not 4@ == 20                        
           not 4@ == 21                        
        jf continue                        
        if and                                                                                                                                                                               
        3@ >= #lapd1
        0@ == 1                                                                                                                                                  
        #csher >= 3@                                                                                                                                                  
        then
            if not Actor.HasWeapon(2@, 4@)                              
            then Actor.GiveWeaponAndAmmo(2@, 4@, 999999)                
            end
            0470: 10@ = actor 2@ current_weapon 
            if and 
            10@ == 22
            not 4@ == 22 
            then
                Actor.GiveWeaponAndAmmo(2@, 4@, 999999)                
            end                                                        
        else                                             
            if 0@ == 2
            then 
                if 3@ == #lapdm1                                                              
                then //0acd: "jjjjjjjjjjjjjj" 100
                //0513: show_text_box_1number 'numbe' number 4@  // ~k~~VEHICLE_ENTER_EXIT~ Usar o Caa Nqueis $~1~

                if 803b: not 10@ == 4@                         
                then Actor.GiveWeaponAndAmmo(2@, 4@, 999999)                
                end
                0470: 10@ = actor 2@ current_weapon                            
                if 10@ == 22                                                    
                then                                                                   
                    if not 4@ == 22                                                    
                    then                                                                 
                        if not Actor.HasWeapon(2@, 4@)                                
                        then Actor.GiveWeaponAndAmmo(2@, 4@, 999999)                  
                        end                                                            
                    end                                                                
                end
                end                                                                    
            else
                if and                         
                3@ == #fbi                                
                0@ == 3                                               
                then
                    if not Actor.HasWeapon(2@, 4@)                              
                    then Actor.GiveWeaponAndAmmo(2@, 4@, 999999)                
                    end
                    0470: 10@ = actor 2@ current_weapon                            
                    if 10@ == 22                                                    
                    then                                                                   
                        if not 4@ == 22                                                    
                        then                                                               
                            if not Actor.HasWeapon(2@, 4@)                                
                            then Actor.GiveWeaponAndAmmo(2@, 4@, 999999)                  
                            end                                                            
                        end                                                                
                    end                                                                    
                else 
                    if and                  
                    3@ == #army         
                    0@ == 4           
                    then
                        if not Actor.HasWeapon(2@, 4@)                              
                        then Actor.GiveWeaponAndAmmo(2@, 4@, 999999)                
                        end
                        0470: 10@ = actor 2@ current_weapon                            
                        if 10@ == 22                                                    
                        then                                                                   
                            if not 4@ == 22                                                    
                            then                                                               
                                if not Actor.HasWeapon(2@, 4@)                                
                                then Actor.GiveWeaponAndAmmo(2@, 4@, 999999)                  
                                end                                                            
                            end                                                                
                        end                                                                    
                    else
                        if and                                                                
                        3@ == #swat                                            
                        0@ == 5                                               
                        then
                            if not Actor.HasWeapon(2@, 4@)                              
                            then Actor.GiveWeaponAndAmmo(2@, 4@, 999999)                
                            end
                            0470: 10@ = actor 2@ current_weapon                            
                            if 10@ == 22                                                    
                            then                                                                   
                                if not 4@ == 22                                                    
                                then                                                               
                                    if not Actor.HasWeapon(2@, 4@)                                
                                    then Actor.GiveWeaponAndAmmo(2@, 4@, 999999)                  
                                    end                                                            
                                end                                                                
                            end                                                                    
                        end
                    end
                end
            end
        end
    END
    IF player.WantedLevel(0) > 1       
    JF CONTINUE
    FOR 0@ = 1 TO 5 STEP 1
        1@  = 300 //START AT
        005a: 1@  += 0@ //ADD 0@
        0AB4: 4@ > 1@  //GET PARAM
        Actor.StorePos($PLAYER_ACTOR, 7@, 1@, 2@)                                                                                                                             
        if 0AE1: 2@ = random_actor_near_point 7@ 1@ 2@ in_radius 500.0 find_next 1 pass_deads 0 //IF and SET                                                                  
        then                                                                                                                                                                  
            IF NOT 2@ == -1                                                                                                                                                   
            THEN                                                                                                                                                              
                IF 056D:   actor 2@ defined                                                                                                                                   
                THEN 0665: get_actor 2@ model_to 3@                                                                                                                           
                    if and
                      0@ == 1
                      4@ == true
                    then                                                                                                                                                  
                        if or                                                                                                                                                              
                            3@ == #lapd1                                                                                                                                               
                            3@ == #sfpd1                                                                                                                                               
                            3@ == #lvpd1                                                                                                                                               
                            3@ == #csher                                                                                                                                               
                        then //0acd: "0000000000000" 100                                                                                                                                   
                            5@ = actor.CurrentCar(2@)                                                                                                                                                 
                            if 5@ >= 100 //eliminate error                                                                                                                                 
                            then                                                                                                                                                  
                                if 056E:   car 5@ defined                                                                                                                                      
                                then                                                                                                                                                  
                                    046C: 6@ = car 5@ driver                                                                                                                                       
                                    if 803b: not 2@ == 6@ //only passenger                                                                                                                       
                                    then 0713: actor 2@ driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 150.0 8 1 firing_rate 100                                                    
                                    end
                                end                                                                                                                                                            
                            end
                         end                                                                                                                                                     
                    else                                                                                                                                                       
                        if and                                                                                                                                                                                                                                                                                             
                            3@ == #lapdm1                                                                                                                                  
                            0@ == 2                                                                                                                                             
                            4@ == true
                        then                                                                                                                                                   
                            5@ = actor.CurrentCar(2@)                                                                                                                        
                            if 5@ >= 100 //eliminate error                                                                                                                                           
                            then                                                                                                                                     
                                if 056E:   car 5@ defined                                                                                                                          
                                then                                                                                                                                      
                                    046C: 6@ = car 5@ driver                                                                                                                           
                                    if 803b: not 2@ == 6@ //only passenger                                                                                                           
                                    then 0713: actor 2@ driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 150.0 8 1 firing_rate 100                                        
                                    end
                                end                                                                                                                                                
                            end                                                                                                                                         
                        else                                                                                                                                                    
                            if and                                                                                                                                        
                                3@ == #fbi                                                                                                                                
                                0@ == 3                                                                                                                                         
                                4@ == true
                            then                                                                                                                                          
                                5@ = actor.CurrentCar(2@)                                                                                                               
                                if 5@ >= 100 //eliminate error                                                                                                                                       
                                then                                                                                                                           
                                    if 056E:   car 5@ defined                                                                                                                 
                                    then                                                                                                                             
                                        046C: 6@ = car 5@ driver                                                                                                                  
                                        if 803b: not 2@ == 6@ //only passenger                                                                                                  
                                        then 0713: actor 2@ driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 150.0 8 1 firing_rate 100                               
                                        end
                                    end                                                                                                                                       
                                end                                                                                                                                
                            else                                                                                                                                                    
                                if and                                                                                                                                                    
                                    3@ == #army                                                                                                                                       
                                    0@ == 4                                                                                                                                             
                                    4@ == true
                                then                                                                                                                                                      
                                    5@ = actor.CurrentCar(2@)                                                                                                                           
                                    if 5@ >= 100 //eliminate error                                                                                                                                   
                                    then                                                                                                                                       
                                        if 056E:   car 5@ defined                                                                                                                             
                                        then                                                                                                                                        
                                            046C: 6@ = car 5@ driver                                                                                                                              
                                            if 803b: not 2@ == 6@ //only passenger                                                                                                              
                                            then 0713: actor 2@ driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 150.0 8 1 firing_rate 100                                           
                                            end
                                        end                                                                                                                                                   
                                    end                                                                                                                                            
                                else                                                                                                                                                       
                                    if and                                                                                                                                          
                                        3@ == #swat                                                                                                                             
                                        0@ == 5                                                                                                                                   
                                        4@ == true
                                    then                                                                                                                                            
                                        5@ = actor.CurrentCar(2@)                                                                                                                 
                                        if 5@ >= 100 //eliminate error                                                                                                                               
                                        then                                                                                                                               
                                            if 056E:   car 5@ defined                                                                                                                   
                                            then                                                                                                                              
                                                046C: 6@ = car 5@ driver                                                                                                                    
                                                if 803b: not 2@ == 6@ //only passenger                                                                                                    
                                                then 0713: actor 2@ driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 150.0 8 1 firing_rate 100                                 
                                                end
                                            end                                                                                                                                         
                                        end                                                                                                                                  
                                    end
                                    0A8D: 11@ = read_memory 0x96914F size 4 virtual_protect 0 //if heat cops hat criminals set        
                                    if 11@ == true                                                                                    
                                    then                                                                                              
                                        5@ = actor.CurrentCar(2@)                                                                   
                                        if 5@ >= 100 //eliminate error                                                                                                                           
                                        then                                                                              
                                            if 056E:   car 5@ defined                                                                     
                                            then                                                                              
                                                046C: 6@ = car 5@ driver                                                                      
                                                if 803b: not 2@ == 6@ //only passenger                                                      
                                                then gosub @get_criminal_handle                                                               
                                                    0713: actor 2@ driveby_actor 30@ car -1 point 0.0 0.0 0.0 radius 150.0 8 1 firing_rate 100  
                                                end 
                                            end                                                                                          
                                        end                                                                                   
                                    end                                                                                                                                              
                                end
                            end
                        end
                    end                                                                                               
                end                                                                                                                                                           
            end                                                                                                                                                               
        end                                                                                                                                                                   
    END
END

:get_criminal_handle
for 12@ = 0 to 0 step 1
    Actor.StorePos($PLAYER_ACTOR, 7@, 8@, 9@)                                                                                                                                             
    if 0AE1: 30@ = random_actor_near_point 7@ 8@ 9@ in_radius 500.0 find_next 1 pass_deads 1 //IF and SET                                                                  
    jf continue                                                                                                                                                                  
    IF NOT 30@ == -1                                                                                                                                                   
    jf continue                                                                                                                                                                
    IF 056D:   actor 30@ defined                                                                                                                                   
    jf continue 
    089F: get_actor 30@ pedtype_to 29@ 
    if not 29@ == 6  //dont shot to fucking yor group fuckers     
    then
    else 30@ = -1
    end
end
return

            
            
:add_occupants            
           
for 12@ = 0 to 0 step 1            
    Actor.StorePos($PLAYER_ACTOR, 7@, 8@, 9@)         
    0AE2: 13@ = random_vehicle_near_point 7@ 8@ 9@ in_radius 400.0 find_next 1 pass_wrecked 0 //IF and SET 
    if not 13@ == -1 
    jf continue
    if 056E:   car 13@ defined 
    jf continue
    if not car.Wrecked(13@)
    jf continue
    if not Actor.InCar($PLAYER_ACTOR, 13@)
    jf continue
    0A97: 14@ = car 13@ struct             
    if not 14@ == 0x0                           
    jf continue //not repeat
    0a12: get_car 13@ primary_color_to 19@ secondary_color_to 20@ 
    if 19@ == 0
    then
        0a11: set_car 13@ primary_color_to 1 secondary_color_to 20@                                                                                                                                 
                                                                                                                                                                       
        0441: 16@ = car 13@ model                                                                                                                                                         
        IF or                                                                                                                                                                                             
            16@ == #copcarla //accept only veh la                                                                                                                                              
            16@ == #copcarsf //accept only veh sf                                                                                                                                              
            16@ == #copcarvg //accept only veh vg                                                                                                                                              
        then                                                                                                                                                                                              
            //ocupants                                                                                                                                                                                    
            0A97: 14@ = car 13@ struct                                                                                                                                                   
            if not 14@ == 0x0                                                                                                                                                                 
            then                                                                                                                                                                             
                046C: 17@ = car 13@ driver                                                                                                                                                   
                if 056D:   actor 17@ defined                                                                                                                                                      
                then                                                                                                                                                                                   
                    if 0449:   actor 17@ in_a_car                                                                                                                                                     
                    then                                                                                                                                                                                   
                        for 18@ = 0 to 2 step 1                                                                                                                                                                  
                            if 0431:   car 13@ passenger_seat_free 18@                                                                                                                                      
                            then 0AA5: call  0x613A00 num_params 6 pop 6 driver false gangPedType 6 seatNumber 18@ male false criminal false CVehicle 14@                                            
                            end                                                                                                                                                                                       
                        end
                    enD
                enD
            end
        end
        IF 16@ == #COPBIKE                                                                                                                               
        THEN                                                                                                                                                                                   
            046C: 17@ = car 13@ driver                                                                                                                                        
            if 056D:   actor 17@ defined                                                                                                                                           
            then                                                                                                                                                                        
                if 0449:   actor 17@ in_a_car                                                                                                                                          
                then                                                                                                                                                                       
                    if 0431:   car 13@ passenger_seat_free 0                                                                                                                                      
                    then 0AA5: call  0x613A00 num_params 6 pop 6 driver false gangPedType 6 seatNumber 0 male false criminal false CVehicle 14@                                            
                    end
                enD
            end                                                                                                                                                                                
        END                                                                                                                                                                                    
    end                                                                                                                                                                                        
end
0ab2: 0                            